<?php
/**
 * americanmostreadcontroller.php
 * Create on 2016-03-29 16:18:49
 * Create by yuebin
 */
namespace haibao\cms\business\control\pc\channel\american;


class AmericanMostReadController extends \haibao\cms\business\control\AmericanController{
	
	public function __construct($updateTime = null,$controlId,$isPublish){
		parent::__construct($updateTime,$controlId,$isPublish);
	}
	
	/**
	 * 显示模版内容（模版动态数据的绑定和模版输出）
	 * @param : String $content
	 * @param : Array $controlData;
	 */
	public function displayTemplateHtml(){
		$controlData = $this->getParameter(self::$CONTROL_DATA);
		$content = $this->getParameter(self::$CONTROL_CONTENT);
		$path = $this->generateHtmlPath(__CLASS__);
		//most read
		$moreReadList = array();
		$moreReadList = $this->getArticleInfo(2);
		$this->assign('moreReadList', $moreReadList);
		$parameters = $this->getControlParameters($controlData);
		$this->assign('parameters', $parameters);
		$this->assign('userHostColler', \haibao\classlibrary\cms\Config::getConfig(\haibao\classlibrary\cms\Config::CLASSLIBRARY_CONFIG_HOST_USER));
		$this->generateHtml($path, $content);
		$content = $this->getHtml($path);
		$content = $this->replaceCDNLink($content);
		return $content;
	}
	
}